import java.awt.Image;
import java.awt.Point;


public abstract class MapLoader {
	
	protected Tile[][] mapData;
	protected int tileSize = 20;
	
	public void createMap(int width,int height)
	{
		mapData = new Tile[width][height];
		Image img = ResourceManager.getManager().load("grass11.jpg");
		for(int x = 0;  x < width; x++)
			for(int y = 0; y < height; y++)
			{
				Tile t = new Tile();
				t.setPosition(new Point(x * tileSize, y * tileSize));
				t.setSize(new Point(tileSize,tileSize));
				t.setTexture(img);
						
				mapData[x][y] = t;
			}
	}
	
	public abstract void load(String fileName);
	
	public Tile[][] getMapData()
	{
		return mapData;
	}
	
	public void setTileSize(int size)
	{
		tileSize = size;
	}
	
	public int getTileSize()
	{
		return tileSize;
	}
	

}
